package org.vacoor.nothing.misc.express.fedex;

/**
 * Created by Administrator on 2014/10/10.
 */
public class FedExDemo {
    /**
     * 晕, FedEx 有两套环境: 开发，生产
     * 开发环境不提供任何测试 tracking number, 查询不到 production 数据
     * 因此要测试 tracking number 必须移动到 product env
     * <p/>
     * 修改 https://wsbeta.fedex.com:443/web-services/track --> https://ws.fedex.com:443/web-services/track
     * <p/>
     * http://stackoverflow.com/questions/18065390/how-track-by-tracking-number-unique-identifier/18084885#18084885
     *
     * @param args
     */

    public static void main(String[] args) {
        /*
        FedExRateService fedExRateService = new FedExRateService();
        fedExRateService.getRate();
        */
        /*
        Address nearToAddress = new Address();
        nearToAddress.setCountryCode("US");          // 必须
//        nearToAddress.setPostalCode("38017");       // 必须
//        nearToAddress.setStateOrProvinceCode("TN");
//        nearToAddress.setCity("Collierville");
//        nearToAddress.setStreetLines(new String[]{"10 FedEx Pkwy"});

//        nearToAddress.setStreetLines(new String[]{"6406 Ivxy Lane"});
//        nearToAddress.setCity("Greenbelst");
//        nearToAddress.setStateOrProvinceCode("MD");
        nearToAddress.setPostalCode("11355");
        new FedExLocsSearchService().search(nearToAddress);
        /*
        new FedExPostalCodeInquiryService().postalCodeInquiry();
        */
//        new FedExTrackService().track();
        new FedExAddrValidationService().validate();
    }
}
